<template>
  <div class="toolbar-actions">
    <button class="btn btn-secondary" @click="$emit('clear-chat')" :disabled="messageCount === 0">
      <span>🗑️</span>
      <span>清空对话</span>
    </button>
    
    <!-- 导出按钮 -->
    <button class="btn btn-secondary" @click="showExportModal" :disabled="messageCount === 0">
      <span>📊</span>
      <span>导出对话</span>
    </button>
  </div>
</template>

<script setup>
defineProps({
  messageCount: {
    type: Number,
    default: 0
  }
})

const emit = defineEmits(['clear-chat', 'show-export-modal'])

// 显示导出弹窗
const showExportModal = () => {
  emit('show-export-modal')
}
</script>


<style scoped>
@import './index.css';
</style>
